<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="ThemeBucket">
  <link rel="shortcut icon" href="#" type="<%=request.getContextPath() %>/image/png">
  <title>欢迎模版页</title>
  <!--data table-->
  <link rel="stylesheet" href="<%=request.getContextPath() %>/js/data-tables/DT_bootstrap.css" />
</head>
<body class="sticky-header" onload="indexmenu('${oneMenu}','${twoMenu}');">
<%@ include file="../index/index.jsp"%>
<section>
    <div class="main-content" >
    	<!-- 	地址栏 -->
		<div class="page-heading">
            <h3>
                	后台管理系统
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">订单管理</a>
                </li>
                <li class="active">顾客订单</li>
            </ul>
        </div>    
        <!--内容开始的地方-->
	<section class="panel">
						<header class="panel-heading custom-tab turquoise-tab">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${currentPage}" >返回上一页</a>
                                </li>
                            </ul>
                             <div class="dataTables_filter" id="dynamic-table_filter">
							        	<input type="text" class="form-control" placeholder="搜索订单" aria-controls="dynamic-table">
							        	<button  class="btn btn-default" type="button" id="search">搜索</button>
							        	<span id="span" hidden="false">${page.currentPage}</span>	        							
		  					</div>
                        </header>
                        <div class="panel-body">
                            <div class="tab-content">
                                <div id="noPayOrders" class="tab-pane active">
								<!-- 顾客订单 -->
					       			<table class="display table table-bordered table-striped dataTable table-hover" id="dynamic-table" aria-describedby="dynamic-table_info">								   	    		
					        			<thead>
								        	<tr role="row">
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">订单号</th>						        	
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">下单人</th>
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">账号关系</th>
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">联系方式</th>								        		
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending">收货地址</th>
												<th tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-sort="descending" aria-label="Browser: activate to sort column ascending">下单时间</th>   					        		
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Engine version: activate to sort column ascending">备注</th>
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">订单状态</th>	
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">订单价格</th>	       
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">查看订单详情</th>
								        	</tr>
								        </thead>
								        <tbody>
								        <c:forEach items="${list}" var="p">
								        <tr role="row">
								        	    <th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">${p.get("indentId")}</th>						        	
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">下单人:${p.get("nickname")}</th>
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending"> 
								        		<c:if test="${p.get('s')==1}">代理商（自己）</c:if>
								        		<c:if test="${p.get('s')==2}">经销商（自己）</c:if>
								        		<c:if test="${p.get('s')==3}">推广员（自己）</c:if><br>
								        		<c:if test="${p.get('fs')==1}">代理商:${p.get('fname')}</c:if>
								        		<c:if test="${p.get('fs')==2}">经销商:${p.get('fname')}</c:if>
								        		<c:if test="${p.get('fs')==3}">推广员:${p.get('fname')}</c:if><br>
								        		<c:if test="${p.get('ffs')==1}">代理商:${p.get('ffname')}</c:if>
								        		<c:if test="${p.get('ffs')==2}">经销商:${p.get('ffname')}</c:if>
								        		<c:if test="${p.get('ffs')==3}">推广员:${p.get('ffname')}</c:if>  
								        		
								        		</th>
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Rendering engine: activate to sort column ascending">下单人:${p.get("phone")}<br>收货人:${p.get("aphone")}</th>								        		
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending"> ${p.get("province")}${p.get("city")}${p.get("area")}${p.get("address")} </th>
												<th tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-sort="descending" aria-label="Browser: activate to sort column ascending">${p.get("beginTime")}</th>   					        		
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Engine version: activate to sort column ascending">${p.get("remark")}</th>
								        		<c:if test="${p.get('status')==0}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">未完成
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		
								        		</c:if>
								        		<c:if test="${p.get('status')==1}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">已接单
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==2}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">测量完成
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==3}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">已付款
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==4}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">待付款
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==5}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">工人出发
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==6}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">中止
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==7}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">已取消
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==8}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">审核中
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==9}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">等待接单
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==10}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">待安装
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==11}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">待评价
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==13}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">制作中
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==14}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">已发货
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        		<c:if test="${p.get('status')==15}">
								        			<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">订单完成
								        				<select class="goodsTypeSelect" onclick="updateStatus(${p.indentId})">
										        			<option >修改订单状态</option>
									        				<option value="0">未完成</option>
									        				<option value="1">已接单</option>
									        				<option value="2">测量完成</option>
									        				<option value="3">已付款</option>
									        				<option value="4">待付款</option>
									        				<option value="5">工人已出发</option>		
									        				<option value="6">中止</option>
									        				<option value="7">已取消</option>
									        				<!-- <option value="8">审核中</option> -->
									        				<option value="9">等待接单</option>		
									        				<option value="10">待安装</option>
									        				<option value="11">待评价</option>
									        				<option value="13">制作中</option>
									        				<option value="14">已发货</option>
									        				<option value="15">订单完成</option>						        				
						        						</select>
								        			</th>
								        		</c:if>
								        			
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending">${p.get("customerPrice")}<br>
								        			<c:if test="${p.get('type')==0&&p.get('customerPrice')>=p.get('mjcl')}"><fmt:formatNumber type="number" value="${p.get('customerPrice')-p.get('indentPrice')-p.get('yj')}" pattern="0.00" maxFractionDigits="2"/>(满减测量费)</c:if>
								        			<c:if test="${p.get('type')==1&&p.get('customerPrice')>=p.get('mjaz')}"><fmt:formatNumber type="number" value="${p.get('customerPrice')-p.get('indentPrice')-p.get('yj')}" pattern="0.00" maxFractionDigits="2"/>(满减安装费)</c:if>
								        		
								        		</th>	       
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1"  aria-label="Platform(s): activate to sort column ascending"><input type="button" value="查看订单性情" onclick="todingdanxiangqing(${p.indentId})"></th>
								        </tr>
								        </c:forEach>
								        </tbody>
									</table>
							<!-- 分页开始 -->
						<%--   <div class="row-fluid">
							  	<div class="span6">
								  	<div class="dataTables_paginate paging_bootstrap pagination">
									  	<ul>
									  	<li class="page-item">
												<a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=1">首页</a>
								  		</li>									  		
								  			<c:choose>
									  			<c:when test="${page.currentPage==1}">
									  				<li class="prev">
									  					<a class="page-link">← 上一页</a>
									  				</li>
									  			</c:when>
									  			<c:otherwise>
									  				<li class="prev">
									  					<a href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${page.currentPage-1}" class="page-link">← 上一页</a>
									  				</li>
									  			</c:otherwise>	 							  			
								  			</c:choose>
						                  <c:forEach begin="1" end="${page.totalPage}" var="p">
						                    	<c:choose>
						                    		<c:when test="${page.currentPage==p}">
						                    			<c:if test="${p==1}">
						                    				<li  class="active page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p}"class="page-link">${p}</a></li> 
						                    				<c:if test="${page.totalPage>1}">
						                    					<li  class="page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p+1}">${p+1}</a></li>
						                    				</c:if>
						                    				<c:if test="${page.totalPage>2}">
						                    					<li  class="page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p+2}">${p+2}</a></li>
						                    				</c:if>
						                    				<c:if test="${page.totalPage>3}">
							                    				<li class="page-item"><a class="page-link" href="#"><%=request.getContextPath() %>.</a></li>
							                    			</c:if>
						                    			</c:if>
						                    			<c:if test="${p>1}">                   			                   			
							                    			<c:if test="${p<page.totalPage}">
							                    				<c:if test="${p>2}">
							                    					<li class="page-item"><a class="page-link" href="#"><%=request.getContextPath() %>.</a></li>
							                    				</c:if>
							                    				<li class="page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p-1}">${p-1}</a></li>
							                    				<li class="active page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p}" class="current_page">${p}</a></li>
							                    				<c:if test="${page.totalPage>2}">
							                    					<li class="page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p+1}">${p+1}</a></li>
							                    				</c:if>
							                    				<c:if test="${page.totalPage-p>1}">
							                    					<li class="page-item"><a class="page-link" href="#"><%=request.getContextPath() %>.</a></li>
							                    				</c:if>
							                    			</c:if>
							                    			<c:if test="${p==page.totalPage}">
							                    				<c:if test="${p>3}">
							                    					<li class="page-item"><a class="page-link" href="#"><%=request.getContextPath() %>.</a></li>
							                    				</c:if>
							                    				<c:if test="${p>2}">
							                    					<li class="page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p-2}">${p-2}</a></li>
							                    				</c:if>
							                    				<li class="page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p-1}">${p-1}</a></li>
							                    				<li class="active page-item"><a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${p}" class="current_page">${p}</a></li>
							                    			</c:if>
						                    			</c:if>
						                    		</c:when>
						                    	</c:choose>
						                    </c:forEach>					

								  			<c:choose>
									  			<c:when test="${page.currentPage==page.totalPage}">
									  					<li class="pre"><a class="page-link">下一页 → </a></li>
									  			</c:when>
									  			<c:otherwise>
									  					<li class="pre"><a href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${page.currentPage+1}" class="page-link">← 下一页</a>
									  					</li>
									  			</c:otherwise>	 							  			
								  			</c:choose>
								  			<li class="page-item">
												<a class="page-link" href="<%=request.getContextPath() %>/indent/toIndent.do?currentPage=${page.totalPage}">尾页</a>
								  			</li>
								  			
											<li class="page-item"> <a class="page-link">总共${page.totalPage}页</a></li>
									  	</ul>
								  	</div>
								</div>
							</div>
							<!-- 分页结束 --> --%>
                                </div>
             
                          </div>
                      </div>
</section>     
     <!-- 查看详情的模态框 1-->
		<div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		  <div class="modal-dialog modal-lg">											
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		        <h4 class="modal-title" id="myModalLabel">订单详情</h4>
		      </div>
		      <div class="modal-body" id="orderDetailDiv">
		       <!--这是模态框内容  -->
	       			<table class="display table table-bordered table-striped dataTable table-hover" id="tb_goodsDetail" aria-describedby="dynamic-table_info">								   	    		
					</table>		       
		       <!-- 这是模态框内容结束 -->
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		      </div>
		    </div>
		  </div>
		</div>       
		<!-- 模态框结束 -->        
	</div>
</section>
</body>
<script src="<%=request.getContextPath() %>/js/orders/customerOrders.js"></script>
<link href="${ctxPath}/js/bootstrap-table/bootstrap-table.css" rel="stylesheet" />
<!-- tables插件的引用 -->
<script src="${ctxPath}/js/bootstrap-table/bootstrap-table.js"></script>
<script src="${ctxPath}/js/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
<script type="text/javascript">
/* var TableInit = function() {
	var oTableInit = new Object();
	//初始化Table
	oTableInit.Init = function(indentId) {
		$("#tb_goodsDetail").bootstrapTable('destroy'); 
		$('#tb_goodsDetail')
				.bootstrapTable(
						{
							url :'${ctxPath}/orders/showGoods.do?indentId='+indentId, //请求后台的URL（*）
							method : 'get', //请求方式（*）
							striped : true, //是否显示行间隔色
							undefinedText:"",
							cache : false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
							pagination : false, //是否显示分页（*）
							sortable : false, //是否启用排序
							sortName : 'sampleId',
							sortOrder : "desc", //排序方式
							//queryParams : oTableInit.queryParams,//传递参数（*）
							sidePagination : "server", //分页方式：client客户端分页，server服务端分页（*）
							pageNumber : 1, //初始化加载第一页，默认第一页
							pageSize : 8, //每页的记录行数（*）
							pageList : [ 8, 25, 50, 100 ],
							search : false, //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
							strictSearch : false,
							showColumns : false, //是否显示所有的列
							minimumCountColumns : 2, //最少允许的列数
							clickToSelect : false, //是否启用点击选中行
							height : 600, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
							uniqueId : "sampleId", //每一行的唯一标识，一般为主键列
							cardView : false, //是否显示详细视图
							detailView : false, //是否显示父子表
							contentType : 'application/x-www-form-urlencoded; charset=UTF-8',
							columns : [
									{
										field : 'sampleId',
										title : 'ID',
										width : '3%',
										align : "center"
									},
									{
										field : 'sampleDescribe',
										title : '商品描述',
										width : '11%',
										align : "center"
									},
									{
										field : 'goodsPrice',
										title : '金额',
										width : '11%',
										align : "center"
									},
									{
										field : 'brand',
										title : '品牌',
										width : '10%',
										align : "center"
									},
									{
										field : 'series',
										title : '系列号',
										width : '20%',
										align : "center"
									},
									{
										field : 'customerAddress',
										title : '分类',
										width : '8%',
										align : "center",
										formatter : function(value, row,
												index) {
											if(value==0){
												return '布艺帘';											
											}else{
												return '成品帘';
											}
										}
									},
									{
										field : 'structure',
										title : '结构',
										width : '10%',
										align : "center",
										formatter : function(value, row,
												index) {
											if(value==0){
												return '单布';
											}else if(value==1){
												return '单纱';
											}else if(value==2){
												return '布+纱';
											}
										}
									},
									{
										field : 'style',
										title : '款式',
										width : '10%',
										align : "center",
										formatter : function(value, row,
												index) {
											if (value == 0) {
												return "打孔";
											} else if(value == 1){
												return "韩折";
											}else if(value == 2){
												return "挂钩";
											}else if(value == 3){
												return "韩折或挂钩";
											}else if(value == 4){
												return "帘头款";
											}
										}
									},
									{
										field : 'times_fold',
										title : '倍折',
										width : '10%',
										align : "center",										
									},
									{
										field : 'shadeDesign',
										title : '帘头款式',
										width : '10%',
										align : "center",										
									},]
						});
	};

	//得到查询的参数
	oTableInit.queryParams = function(params) {
		var temp = { //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
			//limit : params.limit, //页面大小
			//offset : params.offset, //页码
			//order : params.order,
			//sort : params.sort,
			//indentId : 638,
		 };
		return temp;
	  };
	  return oTableInit;
    };
function findGoodsByOrderId2(indentId){	
	$("#myModal").modal('show');
	 var oTable = new TableInit();
	 oTable.Init(indentId);
} */

function updateStatus(id){
	var len = $(".goodsTypeSelect").length;
	for(var i=0;i<$(".goodsTypeSelect").length;i++){

		$($(".goodsTypeSelect")[i]).change(function(){
			
			if(confirm("确定修改么？")){
				$.ajax({
					url:"<%=request.getContextPath() %>/indent/upStatus.do?status="+$(this).val()+"&indentId="+id+"",
					Type:"get",
					success:function(data){
						if(data=="0"){
							alert("修改状态成功");
							window.location.reload();
						}
					}
				})
				
			}else{
				window.location.reload();
			
			}
			
		})
		
	}

}



	function todingdanxiangqing(id){
		window.location.href = "<%=request.getContextPath() %>/indent/toIndentXq.do?indentId="+id;
	}

	$("#search").click(function(){
		var inpVal = $("#dynamic-table_filter input").val();
		var currentPage=$("#span").text();
		window.location.href = "<%=request.getContextPath() %>/indent/search.do?indentId="+inpVal+"&currentPage="+currentPage+"";
	});


</script>
</html>
